<?php include _include(APP_PATH.'view/htm/header.inc.htm');?>

<!--{hook index_start.htm}-->

<!-- only for screenreader  -->
<a role="button" class="sr-only sr-focusable" href="<?php echo url('thread-create-'.$fid);?>"><?php echo lang('thread_create_new');?></a>

<div class="row">
	<div class="col-lg-9">
		
		<!--{hook index_main_start.htm}-->
		
		<div class="card">
			<div class="card-header">
				<ul class="nav nav-tabs card-header-tabs pull-xs-left">
					<li class="nav-item">
						<a class="nav-link <?php echo $active == 'default' ? 'active' : '';?>" href="./"><?php echo lang('new_thread');?></a>
					</li>
					<!--{hook index_thread_list_nav_item_after.htm}-->
				</ul>
			</div>
			<div class="card-block">
				<table class="table table-hover threadlist">
					<tbody>
						<!--{hook index_threadlist_before.htm}-->
						<?php include _include(APP_PATH.'view/htm/thread_list.inc.htm');?>
						<!--{hook index_threadlist_after.htm}-->
					</tbody>
				</table>
			</div>
		</div>
		
		<?php include _include(APP_PATH.'view/htm/thread_list_mod.inc.htm');?>
		
		<!--{hook index_page_before.htm}-->
		<nav class="text-center"><ul class="pagination"><?php echo $pagination; ?></ul></nav>
		<!--{hook index_page_end.htm}-->
		
	</div>
	<div class="col-lg-3 hidden-md-down">
		<a role="button" class="btn btn-primary btn-block btn-sm m-b-sm hidden-md-down" href="<?php echo url('thread-create-'.$fid);?>"><?php echo lang('thread_create_new');?></a>
		<!--{hook index_site_brief_before.htm}-->
		<div class="card">
			<!--{hook index_site_brief_start.htm}-->
			<h4 class="text-center m-t-1"><?php echo $conf['sitename'];?></h4>
			<p class="m-x-1 text-middle"><?php echo $conf['sitebrief'];?></p>
			<div class="card-group card-group-nest">
				
				<div class="card">
					<div class="card-block">
						<div class="text-center text-muted text-nowrap small"><?php echo lang('threads');?></div>
						<div class="text-center text-middle text-bold"><?php echo $runtime['threads'];?></div>
					</div>
				</div>
				<div class="card">
					<div class="card-block">
						<div class="text-center text-muted text-nowrap small"><?php echo lang('posts');?></div>
						<div class="text-center text-middle text-bold"><?php echo $runtime['posts'];?></div>
					</div>
				</div>
				<div class="card">
					<div class="card-block  center-block">
						<div class="text-center text-muted text-nowrap small"><?php echo lang('users');?></div>
						<div class="text-center text-middle text-bold"><?php echo $runtime['users'];?></div>
					</div>
				</div>
				<?php if($runtime['onlines'] > 20) { ?>
				<div class="card">
					<div class="card-block center-block">
						<div class="text-center text-muted text-nowrap small "><?php echo lang('online');?></div>
						<div class="text-center text-middle text-bold"><?php echo $runtime['onlines'];?></div>
					</div>
				</div>
				<?php } ?>
			</div>
			<!--{hook index_site_brief_end.htm}-->
		</div>
		<!--{hook index_site_brief_after.htm}-->
	</div>
</div>

<!--{hook index_end.htm}-->

<?php include _include(APP_PATH.'view/htm/footer.inc.htm');?>

<script>
$('#nav_pc li[fid="<?php echo $fid;?>"]').tab('show');
</script>

<!--{hook index_js.htm}-->